/*
 * RoomsNotAvailableException.java
 *
 * This class is a user-defined exception. This exception is thrown when the
 * number of requested rooms is greater than the unoccupied number
 * of rooms in a hotel.
 *
 * 
 */

package com.javacore.day9.hotel;

/**
 * RoomsNotAvailableException class throws an exception if the requested
 * number of rooms is greater than the available number of rooms.
 * @author 
 */

public class RoomsNotAvailableException extends Exception {
    
    /**
     * Creates a new instance of RoomsNotAvailableException.
     */
    public RoomsNotAvailableException() {
        super();
    }
    
    /**
     * Constructor to pass the error message to the super class.
     * @param rooms Parameter containing the number of rooms available
     */
    public RoomsNotAvailableException(int roomsAvailable){
        super("Currently there are " + roomsAvailable + " rooms available");
    }
    
}
